<html>
<head><meta charset="utf-8"><title>Is there an approved HTML parser? · rustdoc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/index.html">rustdoc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html">Is there an approved HTML parser?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="223194632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223194632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223194632">(Jan 19 2021 at 07:36)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> at some point I would like to add <code>deadlinks</code> to rustdoc (pending FCP, etc). Unfortunately, several of its dependencies have neither an MIT nor an Apache license: <a href="https://github.com/deadlinks/cargo-deadlinks/issues/105#issuecomment-762651349">https://github.com/deadlinks/cargo-deadlinks/issues/105#issuecomment-762651349</a><br>
Are BSD-3-Clause and MPL-2.0 ok? If not, is there an approved HTML parser I can use besides <code>lol_html</code>?</p>



<a name="223214117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223214117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223214117">(Jan 19 2021 at 11:31)</a>:</h4>
<p>Licensing is not a question I can currently help with I'm afraid. Tidy has a list of exceptions, though.</p>



<a name="223234150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223234150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223234150">(Jan 19 2021 at 14:34)</a>:</h4>
<p>Hmm, ok. Is there someone better to ask? I don't want to put a ton of time into this if it's going to get tied up in licensing</p>



<a name="223239757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223239757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223239757">(Jan 19 2021 at 15:08)</a>:</h4>
<p>You can email core@, but I would not expect a quick response right now. That's the right avenue though.</p>



<a name="223254254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223254254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223254254">(Jan 19 2021 at 16:46)</a>:</h4>
<p>oh it actually turns out that html5ever meets all the licenses</p>



<a name="223254338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223254338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223254338">(Jan 19 2021 at 16:46)</a>:</h4>
<p>so the simple fix for this is to just make the HTML parser swappable and use html5ever in rustdoc</p>



<a name="223254914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223254914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223254914">(Jan 19 2021 at 16:50)</a>:</h4>
<p>Use kuchiki instead maybe</p>



<a name="223254954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223254954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223254954">(Jan 19 2021 at 16:51)</a>:</h4>
<p>It makes the API a bit better (and I'm a maintainer in case of issue)</p>



<a name="223255131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223255131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223255131">(Jan 19 2021 at 16:52)</a>:</h4>
<p><span class="user-mention" data-user-id="210316">@GuillaumeGomez</span> that hits the same licensing issue</p>
<div class="codehilite"><pre><span></span><code>tidy error: invalid license `MPL-2.0` in `cssparser 0.27.2 (registry+https://github.com/rust-lang/crates.io-index)`
tidy error: invalid license `MPL-2.0` in `cssparser-macros 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)`
tidy error: invalid license `MPL-2.0` in `dtoa-short 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)`
tidy error: invalid license `MPL-2.0` in `selectors 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)`
tidy error: invalid license `MPL-2.0` in `thin-slice 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)`
</code></pre></div>



<a name="223255178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223255178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223255178">(Jan 19 2021 at 16:52)</a>:</h4>
<p>kuchiki?</p>



<a name="223255193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223255193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223255193">(Jan 19 2021 at 16:52)</a>:</h4>
<p>yes</p>



<a name="223257508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223257508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223257508">(Jan 19 2021 at 17:07)</a>:</h4>
<p>sent an email to core</p>



<a name="223259131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223259131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223259131">(Jan 19 2021 at 17:17)</a>:</h4>
<p>We can always change the license on kuchiki if needed</p>



<a name="223259290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223259290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223259290">(Jan 19 2021 at 17:18)</a>:</h4>
<p>kuchiki isn't the issue, it's the dependencies</p>



<a name="223259299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223259299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223259299">(Jan 19 2021 at 17:18)</a>:</h4>
<p>cssparser and friends</p>



<a name="223275921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223275921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223275921">(Jan 19 2021 at 19:03)</a>:</h4>
<p>ah I see</p>



<a name="223275942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223275942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223275942">(Jan 19 2021 at 19:03)</a>:</h4>
<p>servo people being "out", gonna be complicated</p>



<a name="223286566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223286566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223286566">(Jan 19 2021 at 20:10)</a>:</h4>
<p>Maybe ask on the <a href="https://servo.zulipchat.com/">Servo Zulip</a>?</p>



<a name="223287418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223287418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223287418">(Jan 19 2021 at 20:16)</a>:</h4>
<p>I think it is unlikely they'll change the license, but I'll see what core says</p>



<a name="223287454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223287454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223287454">(Jan 19 2021 at 20:16)</a>:</h4>
<p>The issue is they'd need to get everyone who's ever contributed to agree</p>



<a name="223288477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Is%20there%20an%20approved%20HTML%20parser%3F/near/223288477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Is.20there.20an.20approved.20HTML.20parser.3F.html#223288477">(Jan 19 2021 at 20:23)</a>:</h4>
<p>(also I'd really prefer to use lol_html because it has better performance, but that's a long shot)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>